import { invoke } from "@tauri-apps/api";
import { ISummer } from "../interface/SummonerInfo.ts";
import { getSumInfo } from "./getSumInfo.ts";

export const getOtherSummer = async (summerName: string) => {
  return await invoke("get_other_sum_by_name", { name: summerName });
};
export const getOtherSummerById = async (
  summonerId: string,
): Promise<ISummer> => {
  return getSumInfo(await invoke("get_other_sum", { summonerId: summonerId }));
};
